function toggle(destElement,firstState,secondState, separator, imgOn, imgOff)
{
	destDiv = document.getElementById(destElement);
	destSep = document.getElementById(separator);
	if(destDiv.className==firstState)
	{
		destDiv.className=secondState;
		destSep.src=imgOff;
	}
	else
	{
		destDiv.className=firstState;
		destSep.src=imgOn;
	}
}

function changeCaptcha(container)
{
	var image = document.getElementById(container);
	image.src="images/loading.gif";
	image.src="getCaptcha.php?f="+random()+"?s="+random();
}

function random()
{
	numPosibilidades = 32000;
	aleat = Math.random() * numPosibilidades;
	aleat = Math.round(aleat);
	return parseInt(aleat);
}

function changeClass(target, newClass)
{
	targetObject = document.getElementById(target);
	targetObject.className=newClass;
}